package cn.tedu.boot011.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class BmiController {
    @ResponseBody
    @RequestMapping("/bmi")
    public String bmi(double h,double w){
        double d=w/(h*h);
        if(d<18.5){
            return d+"瘦了";
        }else if(d<24) {
            return d+"刚刚好";
        }else {
            return d+"胖了";
        }

    }

}
